<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ page import="com.store.application.Order" import="java.util.List"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Resultat de la recherche des ordres</title>
</head>
<body>

	
	<table>
		<tr>
			<th>ID</th>
			<th>Prix</th>
			<th>Nombre </th>
			<th> Type </th>
			<th>Prix total</th>
			<th> Date </th>
			<th> Encore en vente ? </th>
		</tr>

		<% 	List<Order> orders = (List<Order>)request.getAttribute("orders");
			Order order;
			for(int i=0; i<orders.size(); i++){
				order = orders.get(i);
		%>

		<tr>
			<td><%=order.getId()%></td>
			<td><%=order.getPrice() %></td>
			<td> <%=order.getType() %></td>
			<td><%=order.getNumberOfProducts() %></td>
			<th> <%=order.getNumberOfProducts() * order.getPrice()  %>
			<td><%=order.getDate()%></td>
			<td> <%=order.isVisibility()%></td> 
			
		
		</tr>

		<% } %>		
	</table>
	
	
</body>
</html>